


//
//  SeventhDetail.m
//  房源、商铺、写字楼详情页
//
//  Created by MB__Lee on 2018/5/22.
//  Copyright © 2018年 MB__Lee. All rights reserved.
//

#import "SeventhDetail.h"

@interface SeventhDetail()

@property (weak, nonatomic) IBOutlet UILabel *contentLabel;


@end

@implementation SeventhDetail

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selected  = NO;
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    // Initialization code
}
-(void)setModel:(MBFangDetailModel *)model{
    [super setModel:model];
   
    
//    self.contentLabel.text = model.describe;
    self.contentLabel.attributedText = [self getAttributedStingWithSting:model.describe];
}
-(NSAttributedString *)getAttributedStingWithSting:(NSString *)string{
    if (string == nil) {
        return nil;
    }
    
    NSMutableParagraphStyle *paragraph  = [[NSMutableParagraphStyle alloc] init];
    paragraph.lineSpacing = 7;
   
    NSMutableDictionary *dict  = [NSMutableDictionary dictionary];
    dict[NSFontAttributeName] = MBFont(14);
    dict[NSParagraphStyleAttributeName] = paragraph;
    
    NSMutableAttributedString *mutAtt = [[NSMutableAttributedString alloc] initWithString:string attributes:dict];
    
    return  mutAtt;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    

    // Configure the view for the selected state
}

@end
